Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

How to update a richtext field in the UI document ?
~Richard Lopluburoden 12/12/2009 11:29 PM
Domino Designer 6.5.4 FP3 Windows XP

What is wrong in my code ?

I am trying to update a richtext field in the uidoc, but it still not refresh the field, any ideas ? Thanks in advance !

Dim ses As New NotesSession
Dim wks As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim viewKeyword As NotesView
Dim docKeyword As NotesDocument
Dim rtitem As NotesRichTextItem
Dim rtGabarit As NotesRichTextItem
Dim response As Boolean
Set db = ses.CurrentDatabase
Set uidoc = wks.CurrentDocument
Set doc = uidoc.Document

Dim Dialogue As New NotesDocument( db )

response = wks.DialogBox( "SMListGabarits" , True , True , False , False , False , False , "Select text.", Dialogue )

If response Then
Set viewKeyword = db.GetView( "VText" )
Set docKeyword = viewKeyword.GetDocumentByKey( Dialogue.GabaritText(0) )
Call uidoc.GotoField( "Comments" )
Set rtitem = New NotesRichTextItem( doc, "Comments" )
Set rtGabarit = docKeyword.GetFirstItem( "BODY" )
Call rtitem.AppendRTItem( rtGabarit )
' I see the richtext value in the rtitem, but unable to update the uidoc here with one of theses 3 code lines ?
Call rtitem.Update
'Call uidoc.Refresh( True )
'Call doc.ComputeWithForm( True, False )
End If

Go back